package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("ym_department")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DepartmentModel {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;//单位名称
    private String shortName;//单位简称
    private Integer sort;//排序
    private Integer status;//1有效0无效
    private Timestamp crtTime;
    private Timestamp upTime;

    @TableField(exist = false)
    private List<DepartmentModel> child;
    @TableField(exist = false)
    private String statusText;//1显示0隐藏
    @TableField(exist = false)
    private Integer personNum;//部门人数
}
